//
//  EnterViewController.m
//  WorkNest
//
//  Created by qbm360 on 15/8/29.
//  Copyright (c) 2015年 nest. All rights reserved.
//

#import "EnterViewController.h"
#import "EAIntroView.h"

@interface EnterViewController ()<EAIntroDelegate>

@end

@implementation EnterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    EAIntroPage *page1 = [EAIntroPage page];
    page1.bgImage = [UIImage imageNamed:@"first"];
    EAIntroPage *page2 = [EAIntroPage page];
    page2.bgImage = [UIImage imageNamed:@"second"];
    EAIntroPage *page3 = [EAIntroPage page];
    page3.bgImage = [UIImage imageNamed:@"third"];
    EAIntroView *intro = [[EAIntroView alloc] initWithFrame:self.view.bounds andPages:@[page1,page2,page3]];
    [intro setDelegate:self];
    [intro showInView:self.view animateDuration:0.0];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)introDidFinish:(EAIntroView *)introView {
    if (_finishCallback) {
        _finishCallback();
        _finishCallback = nil;
    }
    [self dismissViewControllerAnimated:YES completion:nil];
}

@end
